/**
 * 查看接收情况
 */
<template>
  <vp-dialog ref="editDialogRef" :span="1">
        <template #title>
            <vp-label zh="查看圈阅情况" en="Check Circulation Review Status" align="left"/>
        </template>
        <vp-card v-loading="loading">
            <vp-table :data="tableData" row-key="id">
                <el-table-column align="center" label="#"  type="index"></el-table-column>
				<el-table-column prop="ryxm" show-overflow-tooltip>
					<template #header><vp-label zh="接收人" en="Recipient"/></template>
				</el-table-column>
				<el-table-column prop="jsbs" show-overflow-tooltip>
					<template #header><vp-label zh="状态" en="Status"/></template>
                    <template #default="scope">
                        <span>{{ scope.row.jsbs === 1 ? '已阅' : '未阅' }}</span>
                    </template>
				</el-table-column>
				<el-table-column prop="whsj" show-overflow-tooltip>
					<template #header><vp-label zh="接收日期" en="Receive Time"/></template>
                    <template #default="scope">
                        <span>{{ scope.row.jsbs === 1 ? scope.row.whsj : '' }}</span>
                    </template>
				</el-table-column>
            </vp-table>
        </vp-card>
  </vp-dialog>
</template>

<script setup lang="ts" name="viewReception">
import { ref } from 'vue';
import request from '/@/utils/request';

    const tableData = ref([]);
    const loading = ref(false);
    const editDialogRef = ref();
    const id = ref('');


    const handleOpen = (param: any)=>{
        editDialogRef.value.handleOpen();
        id.value = param.id;
        loading.value = true;
        request.get(`/quality/safetyNotice/${param.id}`).then((res)=>{
            tableData.value = res.data.persons || [];
            loading.value = false;
        })
    }

defineExpose({
    handleOpen
})
</script>
